package com.woniu.supermarket.mapper;

import com.woniu.supermarket.entity.Category;
import com.woniu.supermarket.vo.CategoryVo;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CategoryMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Category record);

    Category selectByPrimaryKey(Integer id);

    List<Category> selectAll();

    int updateByPrimaryKey(Category record);

    List<CategoryVo> selectCategoryByPage(String cons);

    int deleteByParentId(Integer parentId);

    Category selectParentCode();

    List<Category> queryAllParentID();

    Category queryParentCodeByID(int id);
}